
package com.multimedia.room.fragment;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import com.multimedia.room.BaseFragment;
import com.multimedia.room.R;

import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

public class BrowserFragment extends BaseFragment {

    public static BrowserFragment newInstance() {
        BrowserFragment fragment = new BrowserFragment();
        return fragment;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.browser_layout, null);
        Button mButton = (Button) rootView.findViewById(R.id.start_browser);
        mButton.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				Intent intent = new Intent();
				intent.setClassName("com.qihoo.padbrowser",
						"com.qihoo.padbrowser.BrowserActivity");
				Uri content_url = Uri.parse("about:blank");
				intent.setData(content_url);
				intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
				startActivity(intent);
				
			}
		});
        return rootView;
    }
    @Override
	public void onDetach() {
		super.onDetach();
	}
    
}
